package com.jt.service;

import org.springframework.stereotype.Service;

@Service
//被代理者
public class UserServiceImpl implements UserService{

    @Override
    public void addUser() { //目标方法
        System.out.println("新增用户");
    }

   /* @Override
    public void addUser() {
        try {
            System.out.println("开启数据库事务");
            System.out.println("新增用户");
            //int a = 1/0;
            System.out.println("提交数据库事务");
        }catch (Exception e){
            System.out.println("事务回滚");
        }
    }*/


}
